export declare abstract class Result<O, E> {
  static ok<O, E>(value: O): Result<O, void>;
  static err<O, E>(value: E): Result<void, E>;
  /** @deprecated */
  is_ok(): this is OkResult<O>;
  isOk(): this is OkResult<O>;
  /** @deprecated */
  is_err(): this is ErrResult<E>;
  isErr(): this is ErrResult<E>;
  unwrap(): O | never;
  /** @deprecated */
  unwrap_or(value: O): O;
  unwrapOr(value: O): O;
  /** @deprecated */
  unwrap_err(): E | never;
  unwrapErr(): E | never;
}

export declare class OkResult<O> extends Result<O, never> {
  is_ok(): this is OkResult<O>;
  isOk(): this is OkResult<O>;
  is_err(): this is ErrResult<never>;
  isErr(): this is ErrResult<never>;
  unwrap(): O;
  unwrap_or(value: O): O;
  unwrapOr(value: O): O;
  unwrap_err(): never;
  unwrapErr(): never;
}

export declare class ErrResult<E> extends Result<never, E> {
  is_ok(): this is OkResult<never>;
  isOk(): this is OkResult<never>;
  is_err(): this is ErrResult<E>;
  isErr(): this is ErrResult<E>;
  unwrap(): never;
  unwrap_or<O>(value: O): O;
  unwrapOr<O>(value: O): O;
  unwrap_err(): E;
  unwrapErr(): E;
}
